package com.eliteams.quick4j.mywork.sqlUtil;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @FileName SqlBuilder.java
 * @Description
 * @Version 1.0
 * @Author liugy.
 * @Email 958130364@qq.com
 * @History <br>
 * <li>Author: liugy</li>
 * <li>Date: 2017-01-16</li>
 * <li>Version: 1.0</li>
 * <li>Content: create</li>
 */
public class SqlBuilder {
	
	public static void main(String[] args) {
		try {
			Class.forName("com.mysql.jdbc.Driver");
			Connection con = java.sql.DriverManager
				.getConnection("jdbc:mysql://localhost:3306/clh", "root", "root");
				
			// For SQLSEVER
			// Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			// Connection con = java.sql.DriverManager.getConnection(
			// "jdbc:sqlserver://192.168.0.33:1433;DatabaseName=www_sxdsw_net",
			// "xiaomayi",
			// "xiaomayi");
			DataBaseUtil dbu = new DataBaseUtil(con, null);
			dbu.makeSql();
			con.close();
			
		} catch (ClassNotFoundException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		}
	}
}
